const baseURL  = "";
export const request = (options) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: baseURL + options.url,
			method: options.method || 'GET',
			data: options.data || {},
			header: {
				'token':  ""
			},
			success: (res) => {
				if (res.data.code == 200) {
					resolve(res.data.data)
				} else {
					reject(res)
				}
				// 如果不满足上述判断就输出数据
			},
			fail: (err) => {
				reject(err)
			},
			complete() {
				// uni.hideLoading()
			}
		})
	})
}